/*
*	Created:			06.03.10
*	Author:				009
*	Last Modifed:		-
*/

#define SAMP_VERSION_034						1
#define SAMP_VERSION_0351						2
#define SAMP_VERSION_0352						3
#define SAMP_VERSION_036						4
#define SAMP_VERSION_037						5
#define SAMP_VERSION_038						6

#define PLUGIN_VERSION							"0.2.6"

#define INVALID_PLAYER_ID						(0xFFFF)
#define INVALID_VEHICLE_ID						(0xFFFF)

#define MAX_PLAYERS								500
#define MAX_NPCS								500
#define MAX_NODES								100

#define NPC_WALKING_DISTANCE					0.1552086 * 600 // 0.1552086 100 ms
#define NPC_RUNING_DISTANCE						0.56444 * 600 // 0.56444 100 ms
#define NPC_SPRINTING_DISTANCE					0.926784 * 600 // 0.926784 100 ms

#define TARGET_CHECK_ROUND						1.0
#define Z_CORRECT								0.5
#define PROJECTILE_START_DIST					6.227
#define PROJECTILE_MAX_AGILITY					485
#define PROJECTILE_DIST_BY_AGILITY				0.053999

#define MAX_NPC_NAME							24

#define NPC_STATE_REQUEST_CLASS					0
#define NPC_STATE_ONFOOT						1
#define NPC_STATE_DRIVER						2
#define NPC_STATE_PASSENGER						3
#define NPC_STATE_DEATH							4
#define	NPC_STATE_PLAYBACK						5

#define BODYPART_HEAD							1
#define	BODYPART_TORSO							2
#define BODYPART_FOOT							3
#define BODYPART_ALL							4

#define	NPC_RECORD_END_REASON_END				1
#define	NPC_RECORD_END_REASON_DEATH				2
#define	NPC_RECORD_END_REASON_STOP				3
#define NPC_RECORD_END_REASON_DESTROY			4

#define UPDATE_TYPE_NONE						0
#define UPDATE_TYPE_ONFOOT						1
#define UPDATE_TYPE_INCAR						2
#define UPDATE_TYPE_PASSENGER					3

#define DAMAGE_TYPE_RAKET_FROM_VEHICLE			1
#define DAMAGE_TYPE_BULLET_FROM_VEHICLE			2
#define DAMAGE_TYPE_BULLET_FROM_PASSENGER		3
#define DAMAGE_TYPE_RAKET						4
#define DAMAGE_TYPE_GRENADE						5
#define DAMAGE_TYPE_MEELE						6
#define DAMAGE_TYPE_BULLET						7

#define MAX_CALLBACKS							7
#define	MAX_CALLBACKS_ARGS						3
#define CALLBACK_GET_DAMAGE						0
#define CALLBACK_MOVING_COMPLETE				1
#define CALLBACK_PLAYBACK_END					2
#define CALLBACK_UPDATE							3
#define CALLBACK_CREATED						4
#define CALLBACK_SPAWNED						5
#define CALLBACK_DEATH							6


typedef void (*logprintf_t)(char* format, ...);
extern logprintf_t logprintf;

struct Vector
{
	float X;
	float Y;
	float Z;
};

struct Quaternion
{
	float X;
	float Y;
	float Z;
	float Scal;
};